package com.xcw.utils;

import java.util.Map;
import java.util.Set;

public class MapUtil {
    /**
     *将map中的value 为null  转换为""
     */
    public static Map<String, Object> nullToEmpty(Map<String, Object> map) {
        Set<String> set = map.keySet();
        if (set != null && !set.isEmpty()) {
            for (String key : set) {
                if (map.get(key) == null) {
                    map.put(key, "");
                }
            }
        }
        return map;
    }
}